package com.muyu.danmo.domain;

import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 社区收藏表 danmo_community_favorite
 * @author : kunzong
 * @date : 2024-11-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DanmoCommunityFavorite extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 收藏唯一标识符 */
    @Excel(name = "收藏唯一标识符")
    private Long id;

    /** 收藏用户ID */
    @Excel(name = "收藏用户ID")
    private Long userId;

    /** 收藏帖子ID */
    @Excel(name = "收藏帖子ID")
    private Long postId;

    /** 收藏时间 */
    @Excel(name = "收藏时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createdTime;

    /** 取消收藏时间 */
    @Excel(name = "取消收藏时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date updatedTime;

    /** 帖子是否收藏 */
    private String favoriteName;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("postId", getPostId())
                .append("createdTime", getCreatedTime())
                .append("updatedTime", getUpdatedTime())
                .toString();
    }
}